Skip to content

test(e2e): W2 LIVE anon provision coverage for all 7 resource flows#171

Merged
mastermanas805 merged 1 commit into
mainfrom
w2-anon-provision-live-e2e
Jun 4, 2026
Merged

test(e2e): W2 LIVE anon provision coverage for all 7 resource flows#171
mastermanas805 merged 1 commit into
mainfrom
w2-anon-provision-live-e2e

Conversation

@mastermanas805

Copy link
Copy Markdown
Member

W2 — Anonymous provisioning, real-backend E2E

Implements W2 from docs/sessions/2026-06-04/USER-FLOW-INVENTORY-AND-TEST-MATRIX.md (§B1, §C1.S, W2 bullet 2): extends the merged WS1-P1 LIVE harness (#170) to cover every anonymous resource-provision flow end-to-end against the real backend.

/db/new is already covered by live-provision-smoke.spec.ts. This PR adds the six remaining anon flows so all seven services have a real-backend, cohort-safe, reaped LIVE spec.

What's covered

e2e/live-anon-provision.spec.ts — registry-driven (rule 18), one test per service:

Flow endpoint usable-conn assertion
vector /vector/new connection_url postgres:// + extension=pgvector
cache /cache/new connection_url redis(s)://
nosql /nosql/new connection_url mongodb(+srv)://
queue /queue/new connection_url nats:// + auth_mode present
storage /storage/new connection_url http(s)/s3:// + mode present
webhook /webhook/new receive_url http(s)://.../webhook/receive/

Each test asserts 201 + usable connection/URL + tier='anonymous' + echoed env (rule 11) + the cohort marker on the provisioned name.

Cleanup guarantee (rule 24)

  • Records to the on-disk cleanup ledger the instant the resource is created, before any throwing assertion.
  • Reaps inline on the happy path; afterAll reaps any still-ledgered entity on a thrown assertion; the out-of-process reap-cohort.ts re-runs the same deletion in CI teardown if the process dies.
  • Anon 24h TTL is a backstop we never rely on.

Gating / CI

  • Gated behind E2E_LIVE=1; per-service 503 (backend disabled in the stack) skips loudly, never a false red.
  • Named live-*.spec.ts so the default mocked config testIgnores it (per-PR CI never needs a live backend), the live config testMatches it, and npm run reap:live + the e2e-live workflow pick it up with zero config/CI change.

Flag note

Test-only specs (no product behavior), gated by E2E_LIVE so they can't run accidentally — the flag-protection DoD rule doesn't require a feature flag here.

Verification

  • npm run gate GREEN — tsc clean, build OK, 1115 vitest pass / 3 skipped (existing mocked suite intact).
  • Live config lists 7 tests across 2 files; cleanly 6 skipped when E2E_LIVE unset.

Matrix mapping kept current in the docs repo (separate remote): per-service-provision coverage row + W2 section updated.

🤖 Generated with Claude Code

Extends the WS1-P1 LIVE real-backend harness (PR #170) to cover every
anonymous resource-provision flow end-to-end against the real api:
vector/cache/nosql/queue/storage/webhook (db is already covered by
live-provision-smoke.spec.ts).

- e2e/live-anon-provision.spec.ts: registry-driven (rule 18) one test per
  service. Asserts POST /S/new -> 201, usable connection_url/receive_url
  matching the per-service scheme (postgres/redis/mongodb/nats/s3/webhook),
  tier='anonymous', echoed env (rule 11), and the cohort marker on the name.
  Per-service extras: storage mode, vector pgvector extension, queue auth_mode.
- Cohort-safe + reaped (rule 24): ledger-before-assert, inline reap on the
  happy path, afterAll backstop, and the out-of-process reap-cohort.ts in CI
  teardown. Anon 24h TTL is a backstop we never rely on.
- Gated behind E2E_LIVE=1; per-service 503 skips loudly. Named live-*.spec.ts
  so the default mocked config testIgnores it, the live config testMatches it,
  and `npm run reap:live` + the e2e-live workflow pick it up with no config or
  CI change.

Verified: npm run gate green (tsc + build + 1115 vitest pass); live config
lists 7 tests across 2 files; cleanly skips (6 skipped) when E2E_LIVE unset.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mastermanas805
mastermanas805 enabled auto-merge (squash) June 4, 2026 19:13
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

size-limit report 📦

Path Size
dist/assets/index-902QtfQT.js 161.98 KB (0%)
dist/assets/index-BsJUZYRr.css 6.13 KB (0%)

@mastermanas805
mastermanas805 merged commit f7879e0 into main Jun 4, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant